package com.lz.serviceload;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * App..
 *
 * @author Lizhong
 * @date 2019/5/9
 */
public class App {
    public static void main(String[] args) {
        ServiceLoader<Person> load = ServiceLoader.load(Person.class);
        Iterator<Person> iterator = load.iterator();
        iterator.forEachRemaining(Person::doThing);
    }
}
